package cn.elricyu.tt.db.bean;

import java.util.Date;

import cn.elricyu.tt.bean.Site;
import cn.elricyu.tt.db.Storable;

public class LoginAccount extends Storable {
	private String entry = Site.ENTRY_QZONE;
	protected String loginId = "";
	private String password = "";
	private String openid = "";
	private String openkey = "";
	private String pfkey = "";
	protected Date gmtCreated;
	protected Date gmtUpdated;

	public LoginAccount(String openId) {
		super();
		this.openid = openId;
	}

	public String getEntry() {
		return entry;
	}

	public void setEntry(String entry) {
		this.entry = entry;
	}

	public String getLoginId() {
		return loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getOpenkey() {
		return openkey;
	}

	public void setOpenkey(String openkey) {
		this.openkey = openkey;
	}

	public String getPfkey() {
		return pfkey;
	}

	public void setPfkey(String pfkey) {
		this.pfkey = pfkey;
	}

	public Date getGmtCreated() {
		return gmtCreated;
	}

	public void setGmtCreated(Date gmtCreated) {
		this.gmtCreated = gmtCreated;
	}

	public Date getGmtUpdated() {
		return gmtUpdated;
	}

	public void setGmtUpdated(Date gmtUpdated) {
		this.gmtUpdated = gmtUpdated;
	}

	public String getKey() {
		return getKey(openid);
	}

	public static String getKey(String openId) {
		return "open_id." + openId;
	}
}
